package com.asl.website.banner.service.impl;

import java.util.List;
import com.asl.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.asl.website.banner.mapper.BizBannerMapper;
import com.asl.website.banner.domain.BizBanner;
import com.asl.website.banner.service.IBizBannerService;

/**
 * banner图Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-22
 */
@Service
public class BizBannerServiceImpl implements IBizBannerService 
{
    @Autowired
    private BizBannerMapper bizBannerMapper;

    /**
     * 查询banner图
     * 
     * @param id banner图主键
     * @return banner图
     */
    @Override
    public BizBanner selectBizBannerById(Long id)
    {
        return bizBannerMapper.selectBizBannerById(id);
    }

    /**
     * 查询banner图列表
     * 
     * @param bizBanner banner图
     * @return banner图
     */
    @Override
    public List<BizBanner> selectBizBannerList(BizBanner bizBanner)
    {
        return bizBannerMapper.selectBizBannerList(bizBanner);
    }

    /**
     * 新增banner图
     * 
     * @param bizBanner banner图
     * @return 结果
     */
    @Override
    public int insertBizBanner(BizBanner bizBanner)
    {
        bizBanner.setCreateTime(DateUtils.getNowDate());
        return bizBannerMapper.insertBizBanner(bizBanner);
    }

    /**
     * 修改banner图
     * 
     * @param bizBanner banner图
     * @return 结果
     */
    @Override
    public int updateBizBanner(BizBanner bizBanner)
    {
        bizBanner.setUpdateTime(DateUtils.getNowDate());
        return bizBannerMapper.updateBizBanner(bizBanner);
    }

    /**
     * 批量删除banner图
     * 
     * @param ids 需要删除的banner图主键
     * @return 结果
     */
    @Override
    public int deleteBizBannerByIds(Long[] ids)
    {
        return bizBannerMapper.deleteBizBannerByIds(ids);
    }

    /**
     * 删除banner图信息
     * 
     * @param id banner图主键
     * @return 结果
     */
    @Override
    public int deleteBizBannerById(Long id)
    {
        return bizBannerMapper.deleteBizBannerById(id);
    }
}
